/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
export const LATCH_TABLE = [
    Int32Array.from([
        0,
        (5 << 16) + 28, // UPPER -> LOWER
        (5 << 16) + 30, // UPPER -> DIGIT
        (5 << 16) + 29, // UPPER -> MIXED
        (10 << 16) + (29 << 5) + 30 // UPPER -> MIXED -> PUNCT
    ]),
    Int32Array.from([
        (9 << 16) + (30 << 4) + 14, // LOWER -> DIGIT -> UPPER
        0,
        (5 << 16) + 30, // LOWER -> DIGIT
        (5 << 16) + 29, // LOWER -> MIXED
        (10 << 16) + (29 << 5) + 30 // LOWER -> MIXED -> PUNCT
    ]),
    Int32Array.from([
        (4 << 16) + 14, // DIGIT -> UPPER
        (9 << 16) + (14 << 5) + 28, // DIGIT -> UPPER -> LOWER
        0,
        (9 << 16) + (14 << 5) + 29, // DIGIT -> UPPER -> MIXED
        (14 << 16) + (14 << 10) + (29 << 5) + 30
        // DIGIT -> UPPER -> MIXED -> PUNCT
    ]),
    Int32Array.from([
        (5 << 16) + 29, // MIXED -> UPPER
        (5 << 16) + 28, // MIXED -> LOWER
        (10 << 16) + (29 << 5) + 30, // MIXED -> UPPER -> DIGIT
        0,
        (5 << 16) + 30 // MIXED -> PUNCT
    ]),
    Int32Array.from([
        (5 << 16) + 31, // PUNCT -> UPPER
        (10 << 16) + (31 << 5) + 28, // PUNCT -> UPPER -> LOWER
        (10 << 16) + (31 << 5) + 30, // PUNCT -> UPPER -> DIGIT
        (10 << 16) + (31 << 5) + 29, // PUNCT -> UPPER -> MIXED
        0
    ])
];
